<html>
  <head>
   <script>
    var numf=0;
	var nums=0;
	var operator;
    function typeNumber(num){
	   document.getElementById("x").value += num;
	}
	function clear{
	   document.getElementById("x").value="";
	   numf=0;
	   nums=0;
	   operator="";
	}
    function sum(){
	  numf=document.getElementById("x").value;
	  operator="+";  
	  document.getElementById("x").value="";
    }
    function mul(){
      numf=document.getElementById("x").value;
	  operator="+";  
	  document.getElementById("x").value="";
    }
    function div(){
	  
      numf=document.getElementById("x").value;
	  operator="+";  
	  document.getElementById("x").value="";
    }
    function sub()
    { numf=document.getElementById("x").value;
	  operator="+";  
	  document.getElementById("x").value="";
	  }
	function equals(numf, operator){
	   nums=getElementById("x").value;
	}
   </script>
  </head>
  <body>
   <table>
     <tr>
       <td colspan="4"><input type="text" id="x"/></td>
	 </tr>
	 <tr>
	   <td><input type="button" value=" 1 " onclick="typeNumber(1)"/></td>
	   <td><input type="button" value=" 2 " onclick="typeNumber(2)"/></td>
	   <td><input type="button" value=" 3 " onclick="typeNumber(3)"/></td>
	 </tr>
	 <tr>
	   <td><input type="button" value=" 4 " onclick="typeNumber(4)"/></td>
	   <td><input type="button" value=" 5 " onclick="typeNumber(5)"/></td>
	   <td><input type="button" value=" 6 " onclick="typeNumber(6)"/></td>
	 </tr>
	 <tr>
	   <td><input type="button" value=" 7 " onclick="typeNumber(7)"/></td>
	   <td><input type="button" value=" 8 " onclick="typeNumber(8)"/></td>
	   <td><input type="button" value=" 9 " onclick="typeNumber(9)"/></td>
	 </tr>
	 <tr>
	   <td><input type="button" value=" 0 " onclick="typeNumber(0)"/></td>
	   <td><input type="button" value=" C " onclick="clear()"/></td>
	   <td><input type="button" value=" = "/></td>
	 </tr>
	 <tr>
	   <td><input type="button" value=" + " onclick="sum()"/></td>
	   <td><input type="button" value=" - " onclick="sub()"/></td>
	   <td><input type="button" value=" * " onclick="mul()"/></td>
	   <td><input type="button" value=" / " onclick="div()"/></td>
	 </tr>
   </table>
</html>